<template>
  <div class="main-container">
    <div style="margin:10px 0 0 10px;">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item>报表统计</el-breadcrumb-item>
        <el-breadcrumb-item>质量管理</el-breadcrumb-item>
        <el-breadcrumb-item>数据汇总</el-breadcrumb-item>
      </el-breadcrumb>
      <el-divider></el-divider>
    </div>
    <div>
      <el-form inline>
        <el-form-item label="请选择统计年份" label-width="120px">
          <el-date-picker v-model="value" type="year" placeholder="请选择统计时段"> </el-date-picker>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="openDialog">统计标准及指标</el-button>
        </el-form-item>
      </el-form>
    </div>
    <el-dialog title="统计标准及指标" :visible.sync="dialogVisible" width="80%" center border stripe>
      <el-table :data="tableData2" stripe style="width: 100%">
        <el-table-column prop="code" label="代码" min-width="80"></el-table-column>
        <el-table-column prop="project" label="项目" min-width="150"></el-table-column>
        <el-table-column prop="reportingStandard" label="填报标准" min-width="500"></el-table-column>
        <el-table-column prop="indicator" label="指标" min-width="250"></el-table-column>
      </el-table>
      <div style="margin-top: 20px;">
        <el-row>
          <el-col :span="6" :offset="2">设计编制：高伟 </el-col>
          <el-col :span="6" :offset="2">批准：李兵 </el-col>
          <el-col :span="6" :offset="2">批准日期:2024年01月06日</el-col>
        </el-row>
        <p>说明：</p>
        <ul>
          <li>1. 统计周期月度结账日，特殊要求见具体明细表。</li>
          <li>2. 报送日期及方式，报表当月结账日16：00时前完成填报、审核，邮件电子版报送；遇节假日顺延至上班第一日16：00时前。</li>
          <li>3. 本表金额计量单位为万元，除特别要求外均为含税额。</li>
          <li>4. 本表统计项与明细报表相同项时，应保持数值相符；</li>
          <li>5. 本表作为公司年终质量绩效考核依据。</li>
        </ul>
      </div>
      <el-button @click="dialogVisible = false">关闭</el-button>
    </el-dialog>
    <div>
      <el-table :data="tableData" border stripe>
        <el-table-column prop="code" label="代码" min-width="80" align="center"></el-table-column>
        <el-table-column prop="project" label="项目" min-width="180" align="center"></el-table-column>
        <el-table-column prop="january" label="1月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="february" label="2月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="march" label="3月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="april" label="4月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="may" label="5月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="june" label="6月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="july" label="7月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="august" label="8月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="september" label="9月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="october" label="10月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="november" label="11月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="december" label="12月" min-width="80" align="center"></el-table-column>
        <el-table-column prop="annualTotal" label="全年合计" min-width="100" align="center"></el-table-column>
        <el-table-column prop="target" label="目标" min-width="100" align="center"></el-table-column>
        <el-table-column prop="achieved" label="是否达成" min-width="100" align="center"></el-table-column
      ></el-table>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'

@Component({
  components: {}
})
export default class EquipmentList extends Vue {
  value = ''
  dialogVisible = false
  openDialog() {
    this.dialogVisible = true
  }
  tableData: any[] = [
    {
      code: '001',
      project: '产品合格率（总）',
      january: '98.40%',
      february: '99.27%',
      march: '96.98%',
      april: '98.13%',
      may: '98.70%',
      june: '97.34%',
      july: '97.83%',
      august: '98.80%',
      september: '91.75%',
      october: '90.29%',
      november: '94.29%',
      december: '95.03%',
      annualTotal: '98.55%',
      target: '≥96%',
      achieved: '达成'
    },
    {
      code: '001-01',
      project: '厂内交检合格率',
      january: '98.37%',
      february: '99.42%',
      march: '99.91%',
      april: '98.64%',
      may: '99.55%',
      june: '99.17%',
      july: '96.67%',
      august: '99.15%',
      september: '98.95%',
      october: '99.15%',
      november: '98.10%',
      december: '99.33%',
      annualTotal: '99.03%',
      target: '≥99%',
      achieved: '达成'
    },
    {
      code: '001-02',
      project: '外购/外协合格率',
      january: '99.64%',
      february: '98.59%',
      march: '93.57%',
      april: '95.74%',
      may: '96.82%',
      june: '93.73%',
      july: '98.03%',
      august: '97.97%',
      september: '76.45%',
      october: '71.73%',
      november: '85.07%',
      december: '85.77%',
      annualTotal: '97.23%',
      target: '≥90%',
      achieved: '达成'
    },
    {
      code: '001-03',
      project: '交付后合格率',
      january: '97.19%',
      february: '99.80%',
      march: '97.47%',
      april: '100.00%',
      may: '99.74%',
      june: '99.11%',
      july: '98.80%',
      august: '99.27%',
      september: '99.85%',
      october: '100.00%',
      november: '99.71%',
      december: '100.00%',
      annualTotal: '99.40%',
      target: '≥99%',
      achieved: '达成'
    },

    {
      code: '002',
      project: '质量损失总成本',
      january: 3806.9,
      february: 4465.3,
      march: 1854.66,
      april: 3942.63,
      may: 2365.47,
      june: 1441.125,
      july: 6108,
      august: 0,
      september: 0,
      october: 1291.68,
      november: 6106.4,
      december: 385,
      annualTotal: 31767.165,
      target: '<70000',
      achieved: '达成'
    },
    {
      code: '002-1',
      project: '质量内部损失成本',
      january: 2128.8,
      february: 1386.7,
      march: 1854.66,
      april: 3942.63,
      may: 2365.47,
      june: 1441.125,
      july: 1553,
      august: 0,
      september: 0,
      october: 1291.68,
      november: 6106.4,
      december: 385,
      annualTotal: 22455.465,
      target: '<50000',
      achieved: '达成'
    },
    {
      code: '002-2',
      project: '质量外部损失成本',
      january: 1678.1,
      february: 3078.6,
      march: 0,
      april: 0,
      may: 0,
      june: 0,
      july: 4555,
      august: 0,
      september: 0,
      october: 0,
      november: 0,
      december: 0,
      annualTotal: 9311.7,
      target: '<20000',
      achieved: '达成'
    },
    {
      code: '003',
      project: '东亚利根反馈次数',
      january: 12,
      february: 0,
      march: 2,
      april: 0,
      may: 5,
      june: 7,
      july: 3,
      august: 3,
      september: 1,
      october: 2,
      november: 2,
      december: 1,
      annualTotal: 38,
      target: '每10万元一次',
      achieved: '达成'
    },
    {
      code: '004',
      project: '其他客户质量反馈次数',
      january: 1,
      february: 1,
      march: 0,
      april: 0,
      may: 0,
      june: 0,
      july: 0,
      august: 0,
      september: 0,
      october: 0,
      november: 0,
      december: 0,
      annualTotal: 2,
      target: '≤12',
      achieved: '达成'
    }
  ]
  tableData2: any[] = [
    {
      code: '001',
      project: '产品合格率（总）',
      reportingStandard: '当月公司各类产品合格率均值，与“产品合格率月报表”统计表相符。',
      indicator: '目标96%以上'
    },
    {
      code: '001-1',
      project: '厂内交检合格率',
      reportingStandard: '当月公司厂内加工产品合格率均值（不统计毛坯原因数量），与“产品合格率月报表”统计表相符。',
      indicator: '目标99%以上'
    },
    {
      code: '001-2',
      project: '外购/外协合格率',
      reportingStandard: '当月公司外协/外购/外包产品合格率均值，与“产品合格率月报表”统计表相符。',
      indicator: '目标90%以上'
    },
    {
      code: '001-3',
      project: '交付合格率',
      reportingStandard: '当月公司交付产品合格率均值。',
      indicator: '目标99%以上'
    },
    {
      code: '002',
      project: '质量损失总成本',
      reportingStandard: '全年质量损失总成本（含返修返工、客户索赔）',
      indicator: '全年<7万，无单次1万元以上质量事故'
    },
    {
      code: '002-1',
      project: '质量内部损失成本',
      reportingStandard: '当月各部门原因致产品质量问题的成本合计，附“不合格成本统计月报”。',
      indicator: '全年<5万元'
    },
    {
      code: '002-2',
      project: '质量外部损失成本',
      reportingStandard: '当月因客户投诉致重新供货等成本合计，附“不合格成本统计月报”。',
      indicator: '全年<2万元'
    },
    {
      code: '003',
      project: '东亚利根反馈次数',
      reportingStandard: '当月处理东亚利根质量投诉件数，以销售部转发客户质量投诉邮件,及年终销售额度计算为准。',
      indicator: '按东亚利根全年销售额比率。每100000元/次。'
    },
    {
      code: '004',
      project: '其他客户质量反馈次数',
      reportingStandard: '当月处理其他客户质量投诉件数，以销售部转发客户质量投诉邮件为准。',
      indicator: '全年小于12次'
    }
  ]
}
</script>

<style lang="scss" scoped></style>
